<template>
    <div>
        <!-- 标题导航组件 -->
        <navtitle title="订单详情"></navtitle>
        <van-address-list v-model="chosenAddressId" :list="list" :disabled-list="disabledList" default-tag-text="默认"
            @add="onAdd" @edit="onEdit" />

        <van-cell-group inset>
            <van-cell title="下单时间" :value="getOrderData.create_time" />
            <van-cell title="订单号" :value="getOrderData.orderId" />
            <van-cell title="订单详情" :value="getOrderData.product_code" />
            <van-cell title="订单价格" :value="(getOrderData.totalPrice / 100).toFixed(2)" />
        </van-cell-group>
        <van-skeleton title :row="10" row-width="100%" />
    </div>
</template>

<script setup>
// 标题导航组件
import navtitle from '@/components/navtitle.vue';

import { useRoute } from 'vue-router';
const route = useRoute()
console.log(route.params.orderId);
import { getOrderApi } from '@/api/api';
import { ref } from 'vue';
let getOrderData = ref([])
let kStart = ref(false)
getOrderApi(route.params.orderId).then((res) => {
    console.log(res);
    getOrderData.value = res.data.data

})

const chosenAddressId = ref('1');
const list = [
    {
        id: '1',
        name: '张三',
        tel: '13000000000',
        address: '浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室',
        isDefault: true,
    },
]
</script>

<style lang="scss" scoped></style>